1. Technical Field
This invention generally relates to the representation of currency units in a computer, and more specifically relates to the conversion of an amount in one currency to an amount in a different currency.
2. Background Art
Since the dawn of the computer age, computer systems have evolved into extremely sophisticated devices, and computer systems may be found in many different settings. Computer systems typically include a combination of hardware, such as semiconductors and circuit boards, and software, also known as computer programs. As advances in semiconductor processing and computer architecture push the performance of the computer hardware higher, more sophisticated computer software has evolved to take advantage of the higher performance of the hardware, resulting in computer systems today that are much more powerful than just a few years ago.
Computer systems can quickly and efficiently manipulate numbers and perform numerical calculations. Computers are in widespread use in business and industry to generate and track financial transactions. One common financial transaction is the conversion an amount of money in one currency to an equivalent amount in a different currency using exchange rates. The conversion from one currency to a different currency is relatively straightforward when a direct exchange rate between the different currency units is available. For the purpose of the discussion herein, the term “source currency” represents the currency units of a known quantity, while the “target currency” represents the currency units of a different currency that need to be represented as the equivalent to the known quantity of source currency units. In other words, if a system knows a price in French Francs (FRF) (the source currency), and needs a price in German Deutschmarks (DEM) (the target currency), the system can easily use a FRF-to-DEM exchange rate to convert from French Francs to German Deutschmarks by multiplying the price in French Francs by the FRF-to-DEM exchange rate to arrive at a price in Deutschmarks. The FRF-to-DEM exchange rate specifies French Francs as the “from currency” and German Deutschmarks as the “to currency”, thereby indicating the direction of the exchange. A conversion from French Francs to German Deutschmarks using the FRF-to-DEM exchange rate is referred to as a direct conversion, and the FRF-to-DEM exchange rate is referred to as a direct exchange rate for this type of conversion. Often, however, direct exchange rates are not available for all currency conversions.
If no direct exchange rate between source and target currency is available, a virtual exchange rate may be generated from other exchange rates. In the example above, if the FRF-to-DEM exchange rate is not available, but a DEM-to-FRF exchange rate is available, the DEM-to-FRF exchange rate may be inverted to generate a FRF-to-DEM conversion rate. In another example, if the FRF-to-DEM exchange rate is not available, but a FRF-to-GBP (Great Britain pounds) exchange rate and a GBP-to-DEM exchange rate are available, the FRF-to-GBP exchange rate may be multiplied by the GBP-to-DEM exchange rate to generate a FRF-to-DEM exchange rate. When the conversion path between two currencies includes two exchange rates with a single intermediate currency, the conversion process is known in the art as “triangulation”.
Due to limitations in the precision of calculations in computer systems that deal with currency, inverting an exchange rate may produce a rate that is less accurate than the non-inverted exchange rate. Furthermore, multiplying multiple exchange rates to generate a new exchange rate can also lead to loss of precision, particularly as the number of intermediate steps increases. Due to these conversion concerns, the European Monetary Union (EMU) has detailed regulations regarding how currency conversions are to be performed. These requirements are described in detail below.
With the introduction of the euro, the EMU has set forth rules regarding conversion and rounding. For example, no inverted rates derived from known conversion rates may be used. In addition, all conversions between national currency units must be performed as follows: monetary amounts to be converted from one national currency unit into another shall first be converted into a monetary amount expressed in the euro unit, which amount may be rounded to not less than three decimals and shall then be converted into the other national currency unit. No alternative method of calculation may be used unless it produces the same result. “Preparing Financial Information Systems for the euro”, European Commission, Directorate General XV, Internal Market and Financial Services, Section II(B)(f) (Brussels, 15 Dec. 1997). These EMU standards for converting from one national currency to another do not necessarily produce the most precise result. However, requiring that all systems adhere to this standard will increase the likelihood that the results from one system to the next will be uniform within an acceptable level of precision. Uniformity of exchange rates between systems is a more important goal for the EMU than a high level of precision.
The introduction of the euro will make triangulation more commonplace, because the EMU requires that exchange rates be kept between participating EMU currencies and the euro, but not directly between separate EMU currencies. However, triangulation must now be done according to the EMU regulations discussed above. These rules require computer systems that perform currency conversions to potentially change how the conversions are performed to conform to the rules. Prior art systems that use inverted exchange rates or triangulation in some other manner to generate virtual exchange rates must now be changed to first convert from the source currency to the euro, then convert from the euro to the target currency.
Some known computer systems use object oriented programs that perform currency conversions. The SanFrancisco Framework developed by IBM is one example of an object oriented solution that provides currency conversions. When a conversion between currencies needs to be performed, a client program requests an exchange rate. If no direct exchange rate is available, the framework computes a virtual exchange rate by multiplying multiple exchange rates together, and returns a virtual exchange rate. In this manner, the exchange rate calculations are encapsulated, and the client that requests the exchange rate does not know how the exchange rate was retrieved or generated. However, this method of computing exchange rates does not conform to the EMU regulations discussed above. One way to satisfy the EMU regulations is to unencapsulate the exchange rate so that the client now must find the source to EMU exchange rate, the EMU to target exchange rate, and perform the conversion according to the EMU regulations. However, unencapsulating the exchange rate requires all client code that uses exchange rates to have knowledge of the specific conversion methods used, making code maintenance much more difficult. Without a mechanism for allowing a computer system to retrieve an encapsulated exchange rate that conforms to the EMU regulations for currency conversions, the computer industry will have to spend considerable time and resources to convert their software to adhere to the EMU conversion standards.